package com.serviceImpl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.dao.DeptmentDao;
import com.model.Deptment;
import com.service.DeptmentService;

@Component("deptService")
public class DeptmentServiceImpl implements DeptmentService{

    private DeptmentDao deptDao;
	public DeptmentDao getDeptDao() {
		return deptDao;
	}

	@Resource
	public void setDeptDao(DeptmentDao deptDao) {
		this.deptDao = deptDao;
	}

	public void addDept(Deptment dept) {
		deptDao.addDept(dept);
	}

	public void deleteDept(Deptment dept) {
		deptDao.deleteDept(dept);
		
	}

	public boolean exists(Deptment dept) {
		return deptDao.exists(dept);
	}

	public Deptment getDept(int id) {
		return this.deptDao.getDept(id);
	}

	public List<Deptment> getDeptmentList(String hql) {
		return this.deptDao.getDeptmentList(hql);
	}

	public void updateDept(Deptment dept) {
		deptDao.updateDept(dept);
	}
}
